<?php
/**
 * Created by.
 * User: littleU-569598569
 * Date: 2021/2/1 0001
 * Time: 19:24
 */

namespace app\api\controller\v1\cms;


use app\api\controller\BaseController;
use app\api\service\AdminMenu as AdminMenuService;

class AdminMenu extends BaseController
{
    /**
     * 获取管理端所有菜单,带有树状结构
     */
    public function getMenuTree()
    {
        return (new AdminMenuService())->getMenuList();
    }

    public function setMenu()
    {
        $data = input('post.');
        $result = (new AdminMenuService())->setMenu($data);
        return $result;
    }
}